{% import "TopxiaWebBundle::macro.html.twig" as web_macro %}
<!--  teacher -->
<div class="es-box teachers">
      <h2>{{ config.title|default(config.defaultTitle) }}</h2>
      {% set teachers = data('RecommendTeachers',{'count':config.count}) %}
      {% if teachers %}
        <ul class="row">
          {% for teacher in teachers %}
            {% if teacher %} 
              <li class="col-sm-6 col-md-4">
                <div class="teachers-item">
                  <a href="{{ path('user_show', {id:teacher.id}) }}">
                   <img class="img-circle" src="{{ file_path(teacher.mediumAvatar, 'avatar.png') }}">
                  </a>
           
                    <span>{{ web_macro.user_link(teacher) }}</span>
                      <i> {{ teacher.title }}</i>
                      <p> {{ teacher.about|plain_text(30) }}</p>
                   </div>
              </li>
            {% endif %}
          {% endfor %}
        </ul>
      {% else %}
            <div class="empty">尚未设置推荐老师，请在管理后台设置。</div>
      {% endif %}
        <a class="more" href="{{ path('teacher') }}">更多&gt;</a>
</div>